package com.jade.generator.controller;

import com.jade.core.web.controller.BaseController;
import com.jade.generator.entity.request.GeneratorReq;
import com.jade.generator.facade.GeneratorFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 代码生成控制器
 * @author Arnold
 * @version 2022/07/05 11:13
 **/
@RestController
@RequestMapping("/generator")
public class GeneratorController extends BaseController {

    @Autowired
    @Lazy
    GeneratorFacade generatorFacade;

    /**
      * 代码生成
      * @param generatorReq 参数对象
      * @return void
      * @author Arnold
      * @date 2022/7/5
      *
     **/
    @PostMapping("/batchGenCode")
    public void batchGenCode(@RequestBody GeneratorReq generatorReq) {
        generatorFacade.generatorCode(generatorReq);
    }


}